package com.code.test;

import com.code.config.ConfigOfLifeCycle;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * IOC生命周期测试
 * 注意：多实例bean容器创建完之后就不再管了
 * @author wangjie
 * @version V1.0
 * @date 2020/1/6
 */
public class IOCTest_LifeCycle {



    @Test
    public void test01(){
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConfigOfLifeCycle.class);
        System.out.println("容器加载完成");
        applicationContext.close();
    }
}
